SUBDIRS = src data doc
noinst_SCRIPTS = toycars.spec
dist_doc_DATA = AUTHORS ChangeLog NEWS README COPYING
EXTRA_DIST = toycars.in.spec
CLEANFILES = $(noinst_SCRIPTS)

toycars.spec: toycars.in.spec Makefile
	$(PACKAGE_PARSE) $(top_srcdir)/toycars.in.spec > toycars.spec

deepdistcheck:
	make && make clean && make && make distcheck

rpm: toycars.spec
	cp toycars-$(PACKAGE_VERSION).tar.bz2 ~/rpmbuild/SOURCES/
	cp $(top_srcdir)/toycars.spec ~/rpmbuild/SPECS
	( cd ~/rpmbuild/SPECS && rpmbuild -ba toycars.spec ) && cp ~/rpmbuild/RPMS/i686/toycars-$(PACKAGE_VERSION)-1.*.i686.rpm $(top_srcdir)/

upload:
	upload toycars $(PACKAGE_TARNAME) $(PACKAGE_VERSION) i686
